/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.registration;

import com.registration.core.*;
import com.registration.membership.Member;
import com.registration.utils.PersistenceEngine;
import java.util.List;

/**
 * @date May 7, 2012
 *
 * @author Ggutierrez
 */
public class RegistrationManager {

    private RegistrationDao dao;
    private PersistenceEngine persistenceEngine;

    public RegistrationManager() {
    }

    public void setDao(RegistrationDao dao) {
        this.dao = dao;
    }

    public void setPersistenceEngine(PersistenceEngine persistenceEngine) {
        this.persistenceEngine = persistenceEngine;
    }        
    
    public void attach(Object object) {
        dao.attach(object);
    }

    public void store(Object object) {
        dao.store(object);
    }

    public Country loadCountry(Long id) {
        return dao.loadCountry(id);
    }

    public List<Country> findCountries() {
        return dao.findCountries();
    }
    
    public Category loadCategory(Long id) {
        return dao.loadCategory(id);
    }
    
    public List<Category> findCategories(Boolean restricted) {
        return dao.findCategories(restricted);
    }

    public List<Hotel> findHotels() {
        return dao.findHotels();
    }
    
    public Person loadPerson(Long id) {
        return dao.loadPerson(id);
    }

    public List<Person> findPerson() {
        return dao.findPerson();
    }
    
    public Attendee loadAttendee(Long id) {
        return dao.loadAttendee(id);
    }
    
    public Attendee loadAttendeeByMemberId(String memberId, Stage currentStage) {
        return dao.loadAttendeeByMemberId(memberId, currentStage);
    }
    
    public Attendee loadAttendeeByConfirmation(String confirmationNumber, Stage currentStage) {
        return dao.loadAttendeeByConfirmation(confirmationNumber, currentStage);
    }
    
    public List<Attendee> findAttendeesByCode(String firstName, String middleName, String lastName, String secondLastName, String memberId, Category category, Country residence, MemberVerification memberVerification, Stage currentStage) {
        return dao.findAttendees(firstName, middleName, lastName, secondLastName, memberId, category, residence, memberVerification, currentStage);
    }
    
    public List<Attendee> findAttendees(String firstName, String middleName, String lastName, String secondLastName, String memberId, String category, String residence, MemberVerification memberVerification, Stage currentStage, String branch) {
        return dao.findAttendees(firstName, middleName, lastName, secondLastName, memberId, category, residence, memberVerification, currentStage, branch);
    }
    
    public List<Attendee> findLeaders() {
        return dao.findLeaders();
    }
    
    public List<Attendee> findHeads() {
        return dao.findHeads();
    }
    
    public Member loadMember(Long id) {
        return dao.loadMember(id);
    }
    
    public Member loadMember(String memberId) {
        return dao.loadMember(memberId);
    }

    public List<Member> findMembers() {
        return dao.findMembers();
    } 
    
    public Long generateConfirmation() {
        return dao.generateConfirmation();
    }
    
    public List<PaymentMethod> findPaymentMethods() {
        return dao.findPaymentMethods();
    }
    
    public List<RoomPlan> findRoomPlans() {
        return dao.findRoomPlans();
    }
}
